# CMake 最低版本号要求

cmake_minimum_required (VERSION 2.8)

# 项目信息

project (sirius3_cblb_alert)

# 宏定义
if (CMAKE_BUILD_TYPE STREQUAL Debug)
    ADD_DEFINITIONS(-DDEBUG)
    # 编译选项
    ADD_COMPILE_OPTIONS(-lrt -fPIC -std=c++11)
else()
    # 编译选项
    ADD_COMPILE_OPTIONS(-lrt -fPIC -std=c++11 -O2)
endif()


# 三方库
set(INC_DIR /usr/local/Qt-5.13.1/include /usr/local/include ./include /usr/local/xc-oes-0.17/include)
set(LINK_DIR /usr/local/Qt-5.13.1/lib /usr/local/lib /usr/local/xc-oes-0.17/lib)
set(LIBS Qt5Core log4cplus pthread oes_api)

include_directories(${INC_DIR})
link_directories(${LINK_DIR})

link_libraries(${LIBS}) 

# 指定生成目标
aux_source_directory(${PROJECT_SOURCE_DIR}/src DIR_SRCS)
add_executable(sirius3_cblb_alert ${DIR_SRCS})

target_link_libraries(sirius3_cblb_alert ${LIBS})